class Article < ApplicationRecord
	has_many :article_logs
  	belongs_to :user

  	after_update :create_log

  	protected
  	  def create_log
  		ArticleLog.create(:title => self.title, :content => self.content, :article_id => self.id) 		
  	  end	
end
